<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>

<style type="text/css">
body {
	background-image: url(../images/mainframe-bg.jpg);
	background-repeat: repeat-x;
	margin: 0px auto;
	padding: 0px;
	position: relative;
	text-align: center;
}
</style>

<script language="javascript">
<!--
function senfe(o,a,b,c,d){
var t=document.getElementById(o).getElementsByTagName("tr");
for(var i=0;i<t.length;i++){
t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
t[i].onclick=function(){
if(this.x!="1"){
this.x="1";//本来打算直接用背景色判断，FF获取到的背景是RGB值，不好判断
this.style.backgroundColor=d;
}else{
this.x="0";
this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
}
}
$(t[i]).mouseover(function(){
if(this.x!="1")this.style.backgroundColor=c;
});
$(t[i]).mouseout(function(){
if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
});
}
}
$(document).ready(function (){
	//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
	senfe("t_systemlog","#e5f1f4","#f8fbfc","#ecfbd4","#bce774");
});
-->

</script>

<script type="text/javascript">
	function search(){			
	   frmList.submit();	
	}
</script>
<div>

<form id="frmList" name="frmList" action="common.systemlogquery.do" method="post">
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="sanxuan" style="background-repeat: repeat;">
	<tbody> 
		<tr>
			<td height="31" width="900px" style="font-size: 14px; color: white; text-align: center">&nbsp;日志查询</td>
		</tr>
		<tr>
			<td>
			<table border="0" width="95%" align="center">
				<tr align="left">
				<td>
					<strong>日志类型:</strong> 
					<select name="logType" id="logType"  style ="width:125px">
						<option value="">请选择...</option>
						<option value="1">登录操作</option>
						<option value="2">新增操作</option>
						<option value="3">更新操作</option>
						<option value="4">删除操作</option>																								
					</select>		
					<strong>日志描述:</strong>
					<input id ="logDesc" name="logDesc" style="width: 125px;" value="${logDesc}" />			
					<strong>操作时间:</strong><input id="startTime" name="startTime"
						type="text" style="width: 125px;" value="${startTime}">
					<a href id="startDateTrigger"><img src="images/calendar.gif"
						border="0"></a> &nbsp;--&nbsp;<input id="endTime" name="endTime"
						type="text" style="width: 125px;" value="${endTime}"><a
						href id="endDateTrigger"><img src="images/calendar.gif"
						border="0"></a></td>
					<td align="left"><img src="<%=request.getContextPath() %>/images/table/chaxun.gif" 
						width="90" height="30" style="cursor: hand;" 
						onclick="javascript:search();" /></td>
				</tr>
			</table>
			</td>
		</tr>
	</tbody>
</table>
<br>
<table width="100%" cellpadding="4" class="liebiao" id="t_systemlog"
	align="center">
	<thead>
		<tr>			
			<td style="width:125px;">操作时间</td>
			<td style="width:95px;">日志类型</td>			
			<td style="width:175px;">日志描述</td>
			<td style="width:125px;">操作IP</td>	
			<td style="width:95px;">操作人</td>								
		</tr>
	</thead>
	<tbody>
		<c:forEach var='log' items="${RA_PAGER_ITEMS}" varStatus="vs">
			<tr>
				<td class="list-value" style="width:95px;">	
				    <fmt:formatDate value="${log.logTime}" pattern="yyyy-MM-dd HH:mm" />			
				</td>
				<td class="list-value" style="width:95px;">
				 <c:choose>
				 	<c:when test="${log.logType eq 1}">登录操作 </c:when>
				 	<c:when test="${log.logType eq 2}">新增操作 </c:when>
				 	<c:when test="${log.logType eq 3}">更新操作 </c:when>
				 	<c:when test="${log.logType eq 4}">删除操作 </c:when>				 	
				 </c:choose>
				</td>
				<td class="list-value">
					${log.logDesc}
				</td>
				<td class="list-value">
					${log.clientIp}
				</td>
				<td class="list-value">
					${log.operator}
				</td>
			</tr>
		</c:forEach>
	</tbody>
	<tfoot>
	</tfoot>
</table>
<br/>
<div class="pagenav"><jsp:include page="/include/pager.jsp" flush="true" /></div>
</form>
</div>
<script type="text/javascript">
var st = new SortableTable( document.getElementById("t_systemlog"), ["None", "String","String", "String","String","String","String" ],'#E4EEF7','white','#FF9900');

Zapatec.Calendar.setup({
        firstDay:1,
        showOthers:true,
        range:[1980.01, 2010.12],
        inputField:"startTime",
        button:"startDateTrigger",
        ifFormat:"%Y-%m-%d %H:%M:%S",
        showsTime: true
        });
Zapatec.Calendar.setup({
        firstDay:1,
        showOthers:true,
        range:[1980.01, 2010.12],
        inputField:"endTime",
        button:"endDateTrigger",
        ifFormat:"%Y-%m-%d %H:%M:%S",
        showsTime: true
        });
        
selectOption('logType','${logType}');
</script>